#include <stdio.h>
int main(){
    int n,i;
    scanf("%d",&n);
    if(n%3==0&&n%5==0&&n%7==0)
        printf("3,5,7");
    if(n%3==0&&n%5==0&&n%7!=0)
        printf("3,5");
    if(n%3==0&&n%7==0&&n%5!=0)
        printf("3,7");
    if(n%5==0&&n%7==0&&n%3!=0)
        printf("5,7");
    if(n%3==0&&n%5!=0&&n%7!=0)
        printf("3");
    if(n%5==0&&n%3!=0&&n%7!=0)
        printf("5");
    if(n%7==0&&n%3!=0&&n%5!=0)
        printf("7");
    if(n%3!=0&&n%5!=0&&n%7!=0)
        printf("NULL");
    return 0;
}
